<%#
    Auth: Wen
    Version: V1.0
    Data: 2019.8.20
    Function:
%>

<%+header%>
<html>
    <head>
    <meta charset="utf-8">
    <title>Wen</title>
    <script type="text/javascript">
    var XHR1 = new XHR();

    function GetAntennaTemperature()
    {
        XHR.poll(10, '<%=controller%>admin/ACU_Antenna/getTemperature', {token:'<%=token%>', step: '1'}, function(x){
        
        //对返回的数据进行解析，并填入到相应的控件
            var str = x.responseText;
            //是否有错误警告
            if(str.match(/Error/g) == null)
            {
                var n = str.split(",");
                document.getElementById("antennaTemperature").innerHTML = n[2] + "&#8451";
                var y = n[3].split("*");
                document.getElementById("antennaHumidity").innerHTML = y[0] + "%";
                document.getElementById("warmingGetOverview").innerHTML = "";
            }
            else
            {
                document.getElementById("warmingGetOverview").innerHTML = "Title:" + x.responseText;
            }
        })
	}
	
    function GetAcuVersion()
    {
        XHR1.post('<%=controller%>admin/ACU_Antenna/getAcuVersion', {token:'<%=token%>', step: '1'}, function(x){
        
            //对返回的数据进行解析，并填入到相应的控件
            var str = x.responseText;
            //是否有错误警告
            if(str.match(/Error/g) == null)
            {
                var n = str.split(",");
                var y = n[2].split("*");
                document.getElementById("acuVersion").innerHTML = y[0];
                document.getElementById("warmingGetOverview").innerHTML = "";
            }
            else
            {
                document.getElementById("warmingGetOverview").innerHTML = "Title:" + x.responseText;
            }
        })
    }
    function GetAntennaSysInfo()
    {
        XHR1.post('<%=controller%>admin/ACU_Antenna/getSysinfo', {token:'<%=token%>', step: '1'}, function(x){
        
            //对返回的数据进行解析，并填入到相应的控件
            var str = x.responseText;
            //是否有错误警告
            if(str.match(/Error/g) == null)
            {
                var n = str.split(",");
                document.getElementById("antennaModel").innerHTML = n[4];
                var y = n[5].split("*");
                document.getElementById("antennaSofeware").innerHTML = y[0];
                document.getElementById("warmingGetOverview").innerHTML = "";
            }
            else
            {
                document.getElementById("warmingGetOverview").innerHTML = "Title:" + x.responseText;
            }
        })
	}
    </script>
    </head>
    <body>
        <p style="color:red;" id="warmingGetOverview"></p>
        <fieldset class="cbi-section">
        <div class="widget-box">
            <div class="widget-title">
                <span class="icon">
                <i class="icon-align-justify"></i>
                </span>
                <h5><%:Antenna Environment%></h5>
            </div>
            <div class="widget-content nopadding">
                <table width="100%" cellspacing="10">
                    <tr><td width="33%"><%:Temperature%></td><td id="antennaTemperature"></td></tr>
                    <tr><td width="33%"><%:Humidity%></td><td id="antennaHumidity"></td></tr>
                </table>
            </div>
        </div>
        </fieldset>
		
        <fieldset class="cbi-section">
        <div class="widget-box">
            <div class="widget-title">
                <span class="icon">
                <i class="icon-align-justify"></i>
                </span>
                <h5><%:System Info%></h5>
            </div>
            <div class="widget-content nopadding">
                <table width="100%" cellspacing="10">
                    <tr><td width="33%"><%:Antenna Model%></td><td id="antennaModel"></td></tr>
                    <tr><td width="33%"><%:ACU Version%></td><td id="acuVersion"></td></tr>
                    <tr><td width="33%"><%:Antenna Software%></td><td id="antennaSofeware"></td></tr>
                </table>
            </div>
        </div>
        </fieldset>
        <script>
        GetAntennaTemperature();
        GetAcuVersion();
        GetAntennaSysInfo();
        GetAcuVersion();
        </script>
    </body>
</html>
<%+footer%>